package main

import (
	"gitee.com/injoyai/goutil/net/mq"
	"log"
	"time"
)

func main() {
	c, err := mq.NewClient(&mq.Option{
		ClientID:  "client1",
		Debug:     true,
		Addr:      "127.0.0.1:10086",
		AppKey:    "testKey",
		AppSecret: "testSecret",
		Retry:     true,
		Timeout:   0,
	})
	if err != nil {
		log.Println(err)
	} else {
		for {
			time.Sleep(time.Second * 3)
			c.Pub("topic", "client1", []byte("钱测试"))
		}
	}

}
